from pydantic import BaseModel
from typing import List
from openai import Agent

class RequirementDSL(BaseModel):
    summary: str
    features: List[str]
    actors: List[str]

agent_requirements = Agent(
    name="RequirementAnalyzer",
    instructions=(
        "你是一个软件需求分析师，请将用户提供的自然语言需求转化为结构化DSL格式。"
        "提取出主要功能点、参与角色等信息。"
    ),
    output_type=RequirementDSL,
    model="gpt-4o"
)